{% extends "./inc/base.html" %} {% block content %}
<section class="vbox">
    <header class="header bg-light dk">
        <div class="btn-group pull-right">
            <a href="/admin/ecom/addplayerrebate" type="button" class="btn btn-info btn-sm"><i class="fa fa-plus text"></i> 添加返利模板</a>
        </div>
        <p>{{controller.meta_title}}</p>
    </header>
    <section class="scrollable wrapper">
    {% for val in list%}
    <section class="panel {%if val.is_default == 1 %} panel-info{%else%} panel-default{%endif%} ">
            <header class="panel-heading">
                <div class=" pull-right">
                    <a href="/admin/ecom/editplayerrebate/?id={{val.id}}" class="btn btn-success btn-xs"><i class="fa fa-edit"></i> 编辑</a>
                    <a href="/admin/ecom/delplayerrebate/?id={{val.id}}" class="btn btn-danger btn-xs confirm ajax-get"><i class="fa fa-trash-o"></i> 删除</a>

                </div>
                {%if val.is_default == 1 %}<span class="label bg-danger">正在使用</span>{%else%}<a href="/admin/ecom/defaulfrebate/?id={{val.id}}" class="btn btn-info btn-xs ajax-get"><i class="fa fa-check"></i> 使用此模板</a>{%endif%} {{val.name}}
            </header>

            <div class="table-responsive">
                <table class="table  b-t b-light" id="export-form">
                    <thead>
                    <tr>
                        
                        <th >运营区域</th>
                        
                        <th class="active" style="width: 100px">一级(%)</th>
                        <th class="warning" style="width: 100px">二级(%)</th>
                        <th class="danger" style="width: 100px">三级(%)</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr class="success"><td>默认返利（指定城市以外的）</td> 
                    <td class="success">{{val.first_ratio}}</td> 
                    <td class="success">{{val.second_ratio}}</td> 
                    <td class="success">{{val.three_ratio}}</td>
                    </tr>
                    {% set zoning = val.zoning|strToJson %}
                    {%for v in zoning %}
                    <tr>
                    <td>{{v.title|safe}}</td> 
                    <td class="active">{{v.f_ratio}}</td> 
                    <td class="warning">{{v.s_ratio}}</td> 
                    <td class="danger">{{v.t_ratio}}</td>
                    </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>

        </section>
        {% endfor %}
    </section>
</section>

{% endblock %}
